package abacab.ext;

import abacab.ActorSystem;

import com.typesafe.config.ConfigException;

/**
 * Represents a provider for an extension
 * 
 * @param <E>
 *          the type of built extension
 */
public interface ExtensionProvider<E extends Extension> {
	/**
	 * @return the extension's id.
	 */
	String getId();

	/**
	 * Create the extension for a particular actor system
	 * 
	 * @param actorSystem
	 *          the actor system
	 * @return the extension
	 * @throws ConfigException
	 *           if the configuration is invalid
	 */
	E create(ActorSystem actorSystem) throws ConfigException;
}